package com.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.bean.JournalBean;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;

@Mapper
public interface IJournalMapper extends BaseMapper<JournalBean> {

    /**
     * 添加日志
     * @param journalBean 日志对象
     */
    @Insert("INSERT INTO t_journal(j_date,j_content)\n" +
            "VALUES(" +
            "#{journalBean.loginDate},#{journalBean.content})\n")
    void add(@Param("journalBean") JournalBean journalBean);
}
